package com.jsbs.iam.user.mapper;

import com.jsbs.iam.user.entity.IamAdminRoleButtonInfo;
import com.jsbs.iam.user.entity.IamAdminRoleMenuInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface IamMenuMapper {

    /**
     * 功能描述：删除菜单权限
     * @param id
     */
    void deleteByRoleId(@Param("roleId") Long id);

    /**
     * 功能描述：批量新增
     * @param menuInfoList
     */
    void batchInsertAdminMenu(@Param("list") List<IamAdminRoleMenuInfo> menuInfoList);

    /**
     * 功能描述：根据菜单ID获取菜单数据
     * @param menuIdList
     * @return
     */
    // List<IamMenu> queryByMenuIds(@Param("menuIdList") List<Long> menuIdList);

    /**
     * 功能描述：批量入表
     * @param buttonInfoList
     */
    void batchInsertAdminButton(@Param("buttonInfoList") List<IamAdminRoleButtonInfo> buttonInfoList);
}
